-- @Author              : GGELUA
-- @Last Modified by    : baidwwy
-- @Date                : 2023-09-27 18:27:45
-- @Last Modified time  : 2023-09-27 19:03:22

local 超级传送 = 多开数据[多开数据.当前].__UI界面.窗口层:创建我的窗口("超级传送",0,0,700,360)
local 当前 =  多开数据.当前
local 基类 = require("界面/控件层/基类/物品基类")
local SDL = require 'SDL'
local GUI控件 = require('GUI.控件')
local function 时间转换(时间)
	return  os.date("%m", 时间).."月"..os.date("%d", 时间).."日 "
end

local 发送内容={
    长安城={1501,92,96},                    --长安城"),
    建邺城={1001,377,49},                   --建邺城"),
    傲来国={1092,73,53},                      --傲来国"),
    长寿村={1070,91,151},                            --长寿村"),
    西梁女国={1040,108,98},                            --西梁女国"),
    宝象国={1226,117,48},                            --宝象国"),
    朱紫国={1208,128,36},                            --朱紫国"),
    ----------------------------------
    钱庄老板={1524,36,23},                                -- 钱庄老板"),
    钟馗={1001,211,115},   	                            -- 钟馗"),
    袁天罡={1001,358,35},   	                            -- 袁天罡"),
    袁守诚={1001,179,263},   	                            -- 袁守诚"),
    商会总管={1001,323,264},   	                            -- 商会总管"),
    杜少海={1001,399,206},   	                            -- 杜少海"),
    镖局={1024,31,24},   	                            -- 镖局"),
    皇宫护卫={1001,441,33},   	                            -- 皇宫护卫"),
    土地公公={1226,117,15},   	                            -- 土地公公"),
    闯关使者={1001,130,90},   	                            -- 闯关使者"),
    仙缘洞天={1216,90,80},   	                            -- 仙缘洞天"),
    月宫吴刚={1114,12,60},   	                            -- 月宫吴刚"),
    镇塔之神={1090,30,27},   	                            -- 镇塔之神"),
    慧觉和尚={1070,130,144},   	                            -- 慧觉和尚"),
    疥癞和尚={1002,30,79},   	                            -- 疥癞和尚"),
    吴举人={1026,26,26},  	                            -- 吴举人"),
    --------------------------------------
    东海湾={1506,76,94},                                -- 东海湾"),
    江南野外={1193,72,69},                                -- 江南野外"),
    大唐国境={1110,141,166},                                -- 大唐国境"),
    大唐境外={1173,345,72},                                -- 大唐境外"),
    墨家村={1218,45,12},                                -- 墨家村"),
    长寿郊外={1091,77,98},                                -- 长寿郊外"),
    碗子山={1228,59,19},                                -- 碗子山"),
    小雷音寺={1204,20,44},                                -- 小雷音寺"),
    观星台={1223,56,32},                                -- 观星台"),
    仙缘洞天={1216,85,75},                                -- 仙缘洞天"),
    柳林坡={1233,50,50},                                -- 柳林坡"),
    北俱芦洲={1174,50,50},                                -- 北俱芦洲"),
    丝绸之路={1235,50,50},                                -- 丝绸之路"),
    比丘国={1232,50,50},                                -- 比丘国"),
    须弥东界={1242,50,50},                                -- 须弥东界"),
    海底5层={1532,33,27},                                -- 海底5层"),
    地狱4层={1130,50,50},                                -- 地狱4层"),
    龙窟2层={1178,81,42},                                -- 龙窟2层"),
    凤巢2层={1187,107,61},                                -- 凤巢2层层"),
    女娲神迹={1201,50,50},                                -- 女娲神迹"),
    -- --------------------------------------
    方寸山={1135,72,63},                              -- 方寸山"),
    盘丝洞={1513,174,31},                               -- 盘丝洞"),
    天宫={1111,175,122},                                 -- 天宫"),
    天机城={1250,63,92},                               -- 天机城"),
    女儿村={1142,37,37},                            -- 女儿村"),
    阴曹地府={1122,101,102},                               -- 阴曹地府"),
    普陀山= {1140,20,18},                              -- 普陀山"),
    女魃墓={1249,51,44},                              -- 女魃墓"),
    神木林= {1138,46,121},                              -- 神木林"),
    无底洞={1139,61,125},                                 -- 无底洞"),
    凌波城={1150,33,67},                            -- 凌波城"),
    花果山={1251,38,76},                               -- 花果山"),
    化生寺={1002,7,88},                           -- 化生寺"),
    魔王寨={1512,76,29},                              -- 魔王寨"),
    五庄观={1146,26,55},                                -- 五庄观"),
    大唐官府={1198,131,82},                           -- 大唐官府"),
    狮驼岭={1131,109,77},                                 -- 狮驼岭"),
    龙宫={1116,71,77},                           -- 龙宫"),
    -- ------------------------------
    蓬莱仙岛={1207,50,50},                                     --蓬莱仙岛"),
    凌云渡={1920,50,50},                                     --凌云渡"),
    解阳山={1042,50,50},                                     --解阳山"),
    麒麟山={1210,50,50},                                     --麒麟山"),
    子母河底={1041,50,50},                                     --子母河底"),
    太岁府={1211,50,50},                                     --太岁府"),
    月宫={1114,50,50}                                     --月宫"),
}


function 超级传送:初始化()
    __置窗口坐标(self)
    local nsf = require('SDL.图像')(700,360)
    if nsf:渲染开始() then
        __res:取图像(__res:取地址('shape/ui/xz/',0x00000012)):显示(0,0)
        nsf:渲染结束()
    end
    self:置精灵(nsf:到精灵())
end

function 超级传送:打开(data)
    self:置可见(true)
    self.友情赞助:置选中(true)
    self.数据 = data
    self.友情赞助系统:重置()
    self.类型 = 1
end

function 超级传送:刷新(data)
    self.数据 = data
    self.类型 = self.类型
end

local 友情赞助系统 = 超级传送:创建控件('友情赞助系统',0,0,700, 360)

function 友情赞助系统:重置()
    超级传送.主城传送控件:置可见(true)
    超级传送.门派传送控件:置可见(false)
    超级传送.野外传送控件:置可见(false)
    超级传送.NPC传送控件:置可见(false)
    local nsf = require('SDL.图像')(700,360)
    if nsf:渲染开始() then
        -- table.print(超级传送.数据)
        __res:取图像(__res:取地址('shape/ui/xz/',0x00000012)):显示(0,0)
        字体16:置颜色(__取颜色("红色"))
        字体16:取图像("1:"..(超级传送.数据.兑换比例 or 0)):显示(327,45) 
        字体16:取图像(超级传送.数据.点卡 or 0):显示(277,277) 
        字体16:取图像(超级传送.数据.仙玉 or 0):显示(435,277) 
        nsf:渲染结束()
    end
    超级传送.图像 = nsf:到精灵()
end

local 关闭 = 超级传送:创建我的按钮(__res:取图像(__res:取地址('shape/ui/xz/',0x00000013)),"关闭",638,0)
function 关闭:左键弹起(x,y,msg)
    超级传送:置可见(false)
end

local 主城传送控件 = 超级传送:创建控件('主城传送控件',100,0,700, 360)

local 主城传送 = 超级传送:创建我的单选按钮(__res:getPNGCC(1,401,65,175,43,true):置拉伸(140,40),__res:getPNGCC(1,963,495,175,43,true):置拉伸(140,40),"主城传送",50,140,"主城传送")

function 主城传送:左键按下(消息,x,y)
    超级传送.类型 = 5
    超级传送.主城传送:置选中(true)
    超级传送.NPC传送:置选中(false)
    超级传送.门派传送:置选中(false)
    超级传送.野外传送:置选中(false)

    超级传送.主城传送控件:置可见(true)
    超级传送.NPC传送控件:置可见(false)
    超级传送.门派传送控件:置可见(false)
    超级传送.野外传送控件:置可见(false)

    local nsf = require('SDL.图像')(700,360)
    if nsf:渲染开始() then
        取白色背景(0,0,450,315,true):显示(195,30)
        nsf:渲染结束()
    end
    超级传送.图像 = nsf:到精灵()
end

for i, v in ipairs {
    {name = "建邺城", x = 110 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '建邺城'},
    {name = "长安城", x = 220 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '长安城'},
    {name = "傲来国", x = 330 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '傲来国'},
    {name = "长寿村", x = 440 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '长寿村'},
    {name = "西梁女国", x = 110 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '西梁女国'},
    {name = "宝象国", x = 220 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '宝象国'},
    {name = "朱紫国", x = 330 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '朱紫国'},
} do
    local 临时函数 = 主城传送控件:创建我的按钮(v.tcp,v.name,v.x,v.y,v.font)
    function 临时函数:左键弹起(x, y)
        发送数据(当前 or self and self.当前,100.5,发送内容[v.name])
    end
end

local 门派传送控件 = 超级传送:创建控件('门派传送控件',100,0,700, 360)

local 门派传送 = 超级传送:创建我的单选按钮(__res:getPNGCC(1,401,65,175,43,true):置拉伸(140,40),__res:getPNGCC(1,963,495,175,43,true):置拉伸(140,40),"门派传送",50,190,"门派传送")

function 门派传送:左键按下(消息,x,y)
    超级传送.友情赞助:置选中(false)
    超级传送.月卡相关:置选中(false)
    超级传送.类型 = 6
    
    超级传送.门派传送:置选中(true)
    超级传送.主城传送:置选中(false)
    超级传送.NPC传送:置选中(false)
    超级传送.野外传送:置选中(false)

    超级传送.友情赞助系统:置可见(false)
    超级传送.奖励网格:置可见(false)
    超级传送.月卡相关系统:置可见(false)
    超级传送.累充好礼系统:置可见(false)
    超级传送.战令奖励系统:置可见(false)

    超级传送.主城传送控件:置可见(false)
    超级传送.NPC传送控件:置可见(false)
    超级传送.野外传送控件:置可见(false)
    超级传送.门派传送控件:置可见(true)

    local nsf = require('SDL.图像')(700,360)
    if nsf:渲染开始() then
        取白色背景(0,0,450,315,true):显示(195,30)
        nsf:渲染结束()
    end
    超级传送.图像 = nsf:到精灵()
end

for i, v in ipairs {
    {name = "方寸山", x = 110 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '方寸山'},
    {name = "盘丝洞", x = 220 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '盘丝洞'},
    {name = "天宫", x = 330 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '天宫'},
    -- {name = "天机城", x = 440 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '天机城'},
    {name = "女儿村", x = 440 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '女儿村'},
    {name = "阴曹地府", x = 110 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '阴曹地府'},
    {name = "普陀山", x = 220 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '普陀山'},
    -- {name = "女魃墓", x = 440 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '女魃墓'},
    {name = "神木林", x = 330 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '神木林'},
    {name = "无底洞", x = 440 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '无底洞'},
    {name = "凌波城", x = 110 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '凌波城'},
    {name = "花果山", x = 220 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '花果山'},
    {name = "化生寺", x = 330 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '化生寺'},
    {name = "魔王寨", x = 440 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '魔王寨'},
    {name = "五庄观", x = 110 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '五庄观'},
    {name = "大唐官府", x = 220 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '大唐官府'},
    {name = "狮驼岭", x = 330 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '狮驼岭'},
    {name = "龙宫", x = 440 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '龙宫'},
} do
    local 临时函数 = 门派传送控件:创建我的按钮(v.tcp,v.name,v.x,v.y,v.font)
    function 临时函数:左键弹起(x, y)
        发送数据(当前 or self and self.当前,100.5,发送内容[v.name])
    end
end

local NPC传送控件 = 超级传送:创建控件('NPC传送控件',100,0,700, 360)

local NPC传送 = 超级传送:创建我的单选按钮(__res:getPNGCC(1,401,65,175,43,true):置拉伸(140,40),__res:getPNGCC(1,963,495,175,43,true):置拉伸(140,40),"NPC传送",50,240,"NPC传送")

function NPC传送:左键按下(消息,x,y)
    超级传送.友情赞助:置选中(false)
    超级传送.月卡相关:置选中(false)
    -- 超级传送.战令系统:置选中(false)
    超级传送.类型 = 7
    -- 战令奖励系统.奖励领取选中 = nil

    超级传送.NPC传送:置选中(true)
    超级传送.门派传送:置选中(false)
    超级传送.主城传送:置选中(false)
    超级传送.野外传送:置选中(false)

    超级传送.主城传送控件:置可见(false)
    超级传送.门派传送控件:置可见(false)
    超级传送.野外传送控件:置可见(false)
    超级传送.NPC传送控件:置可见(true)

    local nsf = require('SDL.图像')(700,360)
    if nsf:渲染开始() then
        取白色背景(0,0,450,315,true):显示(195,30)
        nsf:渲染结束()
    end
    超级传送.图像 = nsf:到精灵()
end

for i, v in ipairs {
    {name = "钱庄老板", x = 110 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '钱庄老板'},
    {name = "钟馗", x = 220 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '钟馗'},
    {name = "袁天罡", x = 330 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '袁天罡'},
    {name = "袁守诚", x = 440 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '袁守诚'},
    {name = "商会总管", x = 110 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '商会总管'},
    {name = "杜少海", x = 220 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '杜少海'},
    {name = "镖局", x = 330 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '镖局'},
    {name = "皇宫护卫", x = 440 ,y = 90 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '皇宫护卫'},
    {name = "土地公公", x = 110 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '土地公公'},
    {name = "闯关使者", x = 220 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '闯关使者'},
    {name = "仙缘洞天", x = 330 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '仙缘洞天'},
    {name = "月宫吴刚", x = 440 ,y = 140 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '月宫吴刚'},
    {name = "镇塔之神", x = 110 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '镇塔之神'},
    {name = "慧觉和尚", x = 220 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '慧觉和尚'},
    {name = "疥癞和尚", x = 330 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '疥癞和尚'},
    {name = "吴举人", x = 440 ,y = 190 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '吴举人'},
} do
    local 临时函数 = NPC传送控件:创建我的按钮(v.tcp,v.name,v.x,v.y,v.font)
    function 临时函数:左键弹起(x, y)
        发送数据(当前 or self and self.当前,100.5,发送内容[v.name])
    end
end

local 野外传送控件 = 超级传送:创建控件('野外传送控件',100,0,700, 360)

local 野外传送 = 超级传送:创建我的单选按钮(__res:getPNGCC(1,401,65,175,43,true):置拉伸(140,40),__res:getPNGCC(1,963,495,175,43,true):置拉伸(140,40),"野外传送",50,290,"野外传送")

function 野外传送:左键按下(消息,x,y)
    超级传送.友情赞助:置选中(false)
    超级传送.月卡相关:置选中(false)
    -- 超级传送.战令系统:置选中(false)
    超级传送.类型 = 8
    -- 战令奖励系统.奖励领取选中 = nil

    超级传送.NPC传送:置选中(false)
    超级传送.门派传送:置选中(false)
    超级传送.主城传送:置选中(false)
    超级传送.野外传送:置选中(true)

    超级传送.主城传送控件:置可见(false)
    超级传送.门派传送控件:置可见(false)
    超级传送.野外传送控件:置可见(true)
    超级传送.NPC传送控件:置可见(false)
    local nsf = require('SDL.图像')(700,360)
    if nsf:渲染开始() then
        取白色背景(0,0,450,315,true):显示(195,30)
        nsf:渲染结束()
    end
    超级传送.图像 = nsf:到精灵()
end

for i, v in ipairs {
    {name = "东海湾", x = 110 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '东海湾'},
    {name = "江南野外", x = 220 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '江南野外'},
    {name = "大唐国境", x = 330 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '大唐国境'},
    {name = "大唐境外", x = 440 ,y = 40 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '大唐境外'},
    {name = "长寿郊外", x = 110 ,y = 83 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '长寿郊外'},
    {name = "碗子山", x = 220 ,y = 83 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '碗子山'},
    {name = "月宫", x = 330 ,y = 83 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '月宫'},
    --{name = "生死劫", x = 330 ,y = 83 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '生死劫'},
    --{name = "观星台", x = 440 ,y = 83 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '观星台'},
    {name = "太岁府", x = 440 ,y = 83 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '太岁府'},
    {name = "仙缘洞天", x = 110 ,y = 126 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '仙缘洞天'},
    {name = "柳林坡", x = 220 ,y = 126 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '柳林坡'},
    {name = "北俱芦洲", x = 330 ,y = 126 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '北俱芦洲'},
    {name = "丝绸之路", x = 440 ,y = 126 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '丝绸之路'},
    {name = "比丘国", x = 110 ,y = 169 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '比丘国'},
    {name = "须弥东界", x = 220 ,y = 169 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '须弥东界'},
    {name = "海底5层", x = 330 ,y = 169 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '海底5层'},
    {name = "地狱4层", x = 440 ,y = 169 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '地狱4层'},

    {name = "墨家村", x = 110 ,y = 213 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '墨家村'},
    {name = "龙窟2层", x = 220 ,y = 213 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '龙窟2层'},
    {name = "凤巢2层", x = 330 ,y = 213 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '凤巢2层'},
    {name = "女娲神迹", x = 440 ,y = 213 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '女娲神迹'},

    {name = "蓬莱仙岛", x = 110 ,y = 256 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '蓬莱仙岛'},
    {name = "凌云渡", x = 220 ,y = 256 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '凌云渡'},
    {name = "解阳山", x = 330 ,y = 256 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '解阳山'},
    {name = "麒麟山", x = 440 ,y = 256 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '麒麟山'},

    {name = "子母河底", x = 110 ,y = 299 , tcp = __res:getPNGCC(1,449,28,174,35,true):拉伸(98,35) , font = '子母河底'},
    
    

} do
    local 临时函数 = 野外传送控件:创建我的按钮(v.tcp,v.name,v.x,v.y,v.font)
    function 临时函数:左键弹起(x, y)
        发送数据(当前 or self and self.当前,100.5,发送内容[v.name])
    end
end